package com.huike.report.vos;

import lombok.Data;

@Data
public class FunnelVO {
    private Integer clueCount;
    private Integer clueEffective;
    private Integer businessEffestive;
    private Integer customEffestive;
    private Double clueRate;
    private Double businessRate;
    private Double customRate;

    public FunnelVO(Integer clueCount,Integer clueEffective,Integer businessEffestive,Integer customEffestive) {
        if (clueCount==0){
            throw new RuntimeException("没有线索");
        }
        this.clueCount=clueCount;
        this.clueEffective=clueEffective;
        this.businessEffestive=businessEffestive;
        this.customEffestive=customEffestive;
        this.clueRate = clueEffective/(clueCount*1.00);
        this.businessRate = businessEffestive/(clueCount*1.00);
        this.customRate = customEffestive/(clueCount*1.00);
    }
}
